//
// Created by LiuYou on 2021/5/12.
//

/*
 * 操作
 *      data()
 *
 */
#include <vector>
#include <iostream>
#include "Book.hpp"


int main() {
    std::vector<Book> vec;
    Book book1("1", "留攸");
    Book book2("2", "留攸");
    Book book3("3", "留攸");
    Book book4("4", "留攸");
    vec.push_back(book1);
    vec.push_back(book2);
    vec.push_back(book3);
    vec.push_back(book4);
    std::cout << "vec.capacity(): " << vec.capacity() << std::endl;
    std::cout << "vec.size(): " << vec.size() << std::endl;

    // 返回指向vec中第一个元素的指针。
    std::cout << *vec.data() << std::endl;

    return 0;
}